import http from '@/utils/request.js'
export default {
  namespaced: true,
  state: {
    info: {}
  },
  mutations: {
    SaveInfo(state, info){
      state.info = info;
    }
  },
  actions: {
    GetInfo ( ctx ) {
      http.get('admin/info').then(res => {
        if(res.err > 0){
          console.error(res.desc);
        }else{
          ctx.commit('SaveInfo', res.result);
        }
      })
    }
  }
}
